Skip to content

feat(pyth-lazer) Add support for FundingRateInterval in lazer protos #2891

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Jul 29, 2025

Conversation

bplatak
Copy link
Contributor

@bplatak bplatak commented Jul 24, 2025

Summary

Add a new field to represent funding rate interval to funding rate update messages in protobuf objects and jrpc domain.

Rationale

We're adding support for variable funding rate updates in lazer as part of PF-278

How has this been tested?

  • Current tests cover my changes
  • Added new tests
  • Manually tested the code

Copy link

linear bot commented Jul 24, 2025

Copy link

vercel bot commented Jul 24, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
api-reference ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 29, 2025 1:44pm
component-library ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 29, 2025 1:44pm
developer-hub ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 29, 2025 1:44pm
entropy-debugger ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 29, 2025 1:44pm
entropy-explorer ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 29, 2025 1:44pm
insights ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 29, 2025 1:44pm
proposals ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 29, 2025 1:44pm
staking ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 29, 2025 1:44pm

Comment on lines 57 to 61
enum FundingRateInterval {
INTERVAL_1H = 0;
INTERVAL_4H = 1;
INTERVAL_8H = 2;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't seem like a good idea to restrict the possible set of values here. Why not use a Duration?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, maybe in the future people have half an hour too :D

Copy link
Contributor

@Riateche Riateche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see one comment below. Otherwise, LGTM!

@@ -52,6 +52,7 @@ pub struct AggregatedPriceFeedData {
pub confidence: Option<Price>,
pub funding_rate: Option<Rate>,
pub funding_timestamp: Option<TimestampUs>,
pub funding_rate_interval: Option<u64>,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should use DurationUs here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants